<!DOCTYPE html>
<html>
  <head>
    <title>活动评价</title>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">


    <link rel="stylesheet" href="__STATIC__/mobile/css/weui.min.css">
	<link rel="stylesheet" href="__STATIC__/mobile/css/jquery-weui.css">
    <!-- <link rel="stylesheet" href="css/style.min.css"> -->
    <link rel="stylesheet" href="__STATIC__/mobile/css/demos.css">
    <link rel="stylesheet" href="__STATIC__/mobile/css/main.css">
    <link rel="stylesheet" href="__STATIC__/mobile/css/iconfont.css">
    <link rel="stylesheet" href="__STATIC__/mobile/lib/jquery.raty.css">
    <script src="__STATIC__/mobile/js/jquery-2.1.4.js"></script>
	<script>
        function checkedVal(hidVal,name){
            var str = $(hidVal).val();
            var arr = str.split(',');
            var val = $(name)

            for(var i=0;i<val.length;i++){
                arr.forEach(function(j){
                    if($(val[i]).attr('value')== j){
                         $(val[i]).attr('checked','checked');
                    }                            
                })
            }
        }
    </script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=DA6Bw0637vf4t96C4GRhyPBMyplqG6zA"></script>
	  <script src="__STATIC__/mobile/js/jquery-2.1.4.js"></script>
	  <!-- <script src="js/fastclick.js"></script> -->
	  <script src="__STATIC__/mobile/lib/jquery.raty.js"></script>
    <style>
    	.navbar {
		    height: 50px;
		    color: #000;
		    background: #ffd966;
		    position: fixed;
		    top: 0;
		    left: 0;
		    right: 0;
		    z-index: 99;
		    display: -webkit-box;
		    display: -ms-flexbox;
		    overflow: hidden;
		}
		.navbar .nav-wrap-left {
		    height: 100%;
		    width: 25%;
		    line-height: 50px;
		}
		.navbar .nav-wrap-left .nav-btn {
		    padding-right: 0;
		}
		.navbar .nav-btn {
		    padding: 0 0 0 10%;
		   	width: 90%;
		   	height: 100%;
		    display: block;
		    color: #000;
		    font-size: 14px;
		}
		a:active, a:focus, a:hover, a:visited {
		    color: #bbb;
		}
		a, a:hover, del, ins, s, u {
		    text-decoration: none;
		}
		.barbtn, a, button, em, input, textarea {
		    -webkit-tap-highlight-color: rgba(255,0,0,0);
		}
		a {
		    color: #666;
		    text-decoration: none;
		    outline: 0;
		}
		.navbar .nav-title {
			width: 50%;
		    height: 100%;
		    overflow: hidden;
		    line-height: 50px;
		    text-align: center;
		    -webkit-box-flex: 1;
		    -ms-flex: 1;
		}
		.navbar .nav-wrap-right {
		    height: 100%;
		    width: 25%;
		    line-height: 50px;
		    text-align: right;
		}
		.filterbar .dropdown-toggle.active {
		    color: #179b16;
		}
		.icon-xuanzechengshi {
			font-size: 8px!important;
		}
		#joblist .list-item .salary span, #loadMore .list-item .salary span, #recommend-job .list-item .salary span {
		    color: #179b16;
		    font-size: .42rem;
		}
		.pic {
			width: 55px!important;
		}
		.pic img{
			width: 55px!important;
			height: 55px;
		}
		.filterbar .dropdown-wrapper {
		    position: absolute;
		    width: 100%;
		    z-index: inherit;
		}
		.filterbar .nav {
		    position: relative;
    		z-index: inherit;
		}
		.block {
			display: block;
		}
		.none {
			display: none;
		}
		.filterbar .nav {
		    display: -webkit-box;
		    display: -ms-flexbox;
		    background: #fff;
		    border-bottom: 1px solid #e5e5e5;
		    text-align: center;
		    height: .86rem;
		    line-height: .86rem;
		    -webkit-user-select: none;
		    font-size: 13px;
		    text-align: center;
		}
		.main {
			/*padding: 0!important;*/
			padding-top: 50px; 
			z-index: 9999999;
		}
		.filterbar .category-wrapper {
		    overflow: scroll;
		}
		.category-wrapper {
			max-height: 480px!important;
		}
		.  .top-logo img{
      border-radius: 50%;
    }
    /*.weui-uploader__file {
        width: 40%;
        height: 79px;
    }*/
    .top-logo {
        width: 100%;
        height: 8em;
        margin-top: 1em;
        overflow: hidden;
    }
    .top-logo img {
        width: 6em;
        height: 6em;
        margin: 1em auto;
        display: block;
    }
    .weui-cell2:after {
        content: " ";
        position: absolute;
        left: 0;
        right: 0;
        height: 1px;
        color: #d9d9d9;
        bottom: 0;
        border-bottom: 1px solid #d9d9d9;
        -webkit-transform-origin: 0 100%;
        transform-origin: 0 100%;
        -webkit-transform: scaleY(.5);
        transform: scaleY(.5);
    }
    /*.weui-uploader__file {
          float: left;
          background: no-repeat 50%;
          background-size: cover;
          display: inline-block;
          margin: 0px 5%;
          background-size: 100% 100%;
      }*/
    .weui-cells {
	    margin-top: 0.2em;
	}
	
    </style>
  </head>

  <body ontouchstart style="background: #fff">
  	
    <div class="navbar">
        <div class="nav-wrap-left">
            <a class="nav-btn" href="javascript:history.go(-1);">
                <i style="font-size: 22px" class="iconfont icon-goback"></i>
            </a>
        </div>
		<div class="nav-title">活动评价</div>
        <div class="nav-wrap-right">
            
        </div>
    </div>
    <!-- 正文 -->
    <div class="main">
    <form action='' method='post'enctype="multipart/form-data" > 
    	<div class="weui-cells weui-cells_form">
    		<div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">项目名称</label></div>
		        <div class="weui-cell__bd">
		            <input id="summary_name" class="weui-input" type="text" value="{$info.program}" readonly >
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">城市</label></div>
		        <div class="weui-cell__bd">
		            <input id="summary_city" class="weui-input" type="text" value="{$info.city}" readonly>
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">楼盘</label></div>
		        <div class="weui-cell__bd">
		            <input id="summary_building" class="weui-input" type="text" value="{$info.loupan}" readonly>
		        </div>
		    </div>
		    <!-- <div id="star" data-score="1"></div> -->
	  	</div>
		<div class="weui-cells weui-cells_form">
	  		<div style="text-align: center;padding: 5px 0;background: #ffd966;color: #000;font-family: "黑体";">评价</div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">场地人流量</label></div>
		        <div class="weui-cell__bd">
		            <div id="summary_flowrate" data-score='{$summary_loupan.summaryinput_flowrate}'></div>
		            <input id="summaryinput_flowrate" name='summaryinput_flowrate' type="hidden">
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">人群参与度</label></div>
		        <div class="weui-cell__bd">
		            <div id="summary_involvement" data-score='{$summary_loupan.summaryinput_involvement}'></div>
		            <input id="summaryinput_involvement" name='summaryinput_involvement' type="hidden">
		        </div>
		    </div>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">物业配合度</label></div>
		        <div class="weui-cell__bd">
		            <div id="summary_adaptability" data-score='{$summary_loupan.summaryinput_adaptability}'></div>
		            <input id="summaryinput_adaptability" name='summaryinput_adaptability' type="hidden">
		        </div>
		    </div>
		   <!-- <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">楼盘活动评分</label></div>
		        <div class="weui-cell__bd">
                <if condition='$summary eq 0'>
		            <input id="summary_score" name="summary_score" class="weui-input" type="number" value='{$summary_loupan.score}' onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');">
                <else/>
                    <input id="summary_score" name="summary_score" class="weui-input" type="number" value='{$summary_loupan.score}' readonly>
                </if>
		        </div>
		    </div>-->
	  	</div>
<if condition="$info['summary'] eq 1">
		<!-- 已提交信息模块 -->
	  	<div class="weui-cells weui-cells_form">
	  		<div style="text-align: center;padding: 5px 0;background: #ffd966;color: #000;font-family:‘黑体’;">运输员评价</div>

	    	<div class="weui-cells weui-cells_checkbox">
		    	<label class="weui-cell weui-check__label" for="s11">
		        	<div class="weui-cell__hd">
		          		<input type="checkbox" class="weui-check" name="checkbox1" value="守时" id="s11" disabled="disabled"> 
		          		<i class="weui-icon-checked"></i>
		        	</div>
		        	<div class="weui-cell__bd">
		          		<p>守时</p>
		        	</div>
		      	</label>
		      	<label class="weui-cell weui-check__label" for="s12">
		        	<div class="weui-cell__hd">
			          	<input type="checkbox" name="checkbox1" class="weui-check" value="活地图" id="s12" disabled="disabled">
			          	<i class="weui-icon-checked"></i>
			        </div>
			        <div class="weui-cell__bd">
			          	<p>活地图</p>
			        </div>
		      	</label>
		      	<label class="weui-cell weui-check__label" for="s13">
		        	<div class="weui-cell__hd">
			          	<input type="checkbox" name="checkbox1" class="weui-check" value="驾驶平稳" id="s13" disabled="disabled">
			          	<i class="weui-icon-checked"></i>
			        </div>
			        <div class="weui-cell__bd">
			          	<p>驾驶平稳</p>
			        </div>
		      	</label>
		      	<label class="weui-cell weui-check__label" for="s14">
		        	<div class="weui-cell__hd">
			          	<input type="checkbox" name="checkbox1" class="weui-check" value="善于沟通" id="s14" disabled="disabled">
			          	<i class="weui-icon-checked"></i>
			        </div>
			        <div class="weui-cell__bd">
			          	<p>善于沟通</p>
			        </div>
		      	</label>
                <input type='hidden' name='driver-pinglun' value='{$summary_dir.desc}' class='driver-pinglun'>
		    </div>
            <script>
                checkedVal(".driver-pinglun",'input[name="checkbox1"]')
            </script>
			<div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">整体评分</label></div>
		        <div class="weui-cell__bd">
		            <div id="summary_driver" data-score='{$summary_dir.score}'></div>
		            <input id="summaryinput_driver" name="summaryinput_driver" type="hidden">
		        </div>
		    </div>
	  	</div>
	<div class="weui-cells weui-cells_form">
	  		<div style="text-align: center;padding: 5px 0;background: #ffd966;color: #000;font-family: '黑体';">促销生评价</div>


	<volist name="student" id="vo" key="key">
		
		<div class="weui-cells weui-cells_checkbox student_wrap" id="student-{$key}">
			<div class="weui-cell">
			        <div class="weui-cell__hd"><label class="weui-label">促销生姓名</label></div>
			        <div class="weui-cell__bd">
			            <input id="summary_salename" class="weui-input" type="text" value="{$vo['name']}" readonly >
	                    <input type='hidden' name='student{$key}' value="12">
			        </div>
			</div>
        		<input type="hidden" name="w_id" value="{$vo.w_id}">
			<label class="weui-cell weui-check__label" for="s21{$key}">
				<div class="weui-cell__hd">
				<input type="checkbox" class="weui-check" name="evaluation{$key}" value="兼职老手" id="s21{$key}" disabled="disabled">
				<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
				<p>兼职老手</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s22{$key}">
				<div class="weui-cell__hd">
				<input type="checkbox" name="evaluation{$key}" class="weui-check" value="推销狂人" id="s22{$key}" disabled="disabled">
				<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
				<p>推销狂人</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s23{$key}">
				<div class="weui-cell__hd">
				<input type="checkbox" name="evaluation{$key}" class="weui-check" value="做事利索" id="s23{$key}" disabled="disabled">
				<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
				<p>做事利索</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s24{$key}">
				<div class="weui-cell__hd">
				<input type="checkbox" name="evaluation{$key}" class="weui-check" value="诚实守信" id="s24{$key}" disabled="disabled">
				<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
				<p>诚实守信</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s25{$key}">
				<div class="weui-cell__hd">
				<input type="checkbox" name="evaluation{$key}" class="weui-check" value="踏实稳重" id="s25{$key}" disabled="disabled">
				<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
				<p>踏实稳重</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s26{$key}">
				<div class="weui-cell__hd">
				<input type="checkbox" name="evaluation{$key}" class="weui-check" value="热情饱满" id="s26{$key}" disabled="disabled">
				<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
				<p>热情饱满</p>
				</div>
			</label>
                <input type='hidden' name='student-pingjia' value='{$vo.desc}'  class='student-pingjia{$key}'>
		    <div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">整体评分</label></div>
		        <div class="weui-cell__bd">
		            <div id="summary_saleman{$key}" data-score='{$vo.score}'></div>
		            <input id="summaryinput_saleman{$key}" name="summaryinput_saleman" type="hidden" class="score">
		        </div>
		    </div>
		</div>
        <script>
            checkedVal(".student-pingjia{$key}",'input[name="evaluation{$key}"]')
            $("#summary_saleman{$key}").raty({
                hints:["1","2","3","4","5"],
                path:"__STATIC__/mobile/images",
				readOnly: true, 
                click:function(score,evt) {
                    //alert(score+" "+evt);
                  //alert( $("#summaryinput_saleman{$key}").val(score)) ;
                  console.log( $("#summaryinput_saleman{$key}").val(score));
                },
                score : function(){
                	return $(this).attr("data-score")
                }
            });
	        $('#summary_flowrate').raty({
			  size:100,
			  path:"__STATIC__/mobile/images",
			  readOnly: true, 
	          score: function() {
	            return $(this).attr('data-score');
	          }
	        });
	        $('#summary_involvement').raty({
			  size:100,
			  path:"__STATIC__/mobile/images",
			  readOnly: true, 
	          score: function() {
	            return $(this).attr('data-score');
	          }
	        });
	        $('#summary_adaptability').raty({
			  size:100,
			  path:"__STATIC__/mobile/images",
			  readOnly: true, 
	          score: function() {
	            return $(this).attr('data-score');
	          }
	        });

	        $('#summary_driver').raty({
	      		path:"__STATIC__/mobile/images",
	      		size:100,
	      		readOnly: true, 
	          score: function() {
	            return $(this).attr('data-score');
	          }
	        });
        </script>
	</volist>
	<else/>
	 	<!-- 未提交信息模块 -->
	  	<div class="weui-cells weui-cells_form">
	  		<div style="text-align: center;padding: 5px 0;background: #ffd966;color: #000;font-family: "黑体";">运输员评价</div>

	    	<div class="weui-cells weui-cells_checkbox">
		    	<label class="weui-cell weui-check__label" for="s11">
		        	<div class="weui-cell__hd">
		          		<input type="checkbox" class="weui-check" name="checkbox1" value="守时" id="s11">
		          		<i class="weui-icon-checked"></i>
		        	</div>
		        	<div class="weui-cell__bd">
		          		<p>守时</p>
		        	</div>
		      	</label>
		      	<label class="weui-cell weui-check__label" for="s12">
		        	<div class="weui-cell__hd">
			          	<input type="checkbox" name="checkbox1" class="weui-check" value="活地图" id="s12">
			          	<i class="weui-icon-checked"></i>
			        </div>
			        <div class="weui-cell__bd">
			          	<p>活地图</p>
			        </div>
		      	</label>
		      	<label class="weui-cell weui-check__label" for="s13">
		        	<div class="weui-cell__hd">
			          	<input type="checkbox" name="checkbox1" class="weui-check" value="驾驶平稳" id="s13">
			          	<i class="weui-icon-checked"></i>
			        </div>
			        <div class="weui-cell__bd">
			          	<p>驾驶平稳</p>
			        </div>
		      	</label>
		      	<label class="weui-cell weui-check__label" for="s14">
		        	<div class="weui-cell__hd">
			          	<input type="checkbox" name="checkbox1" class="weui-check" value="善于沟通" id="s14">
			          	<i class="weui-icon-checked"></i>
			        </div>
			        <div class="weui-cell__bd">
			          	<p>善于沟通</p>
			        </div>
		      	</label>
                <input type='hidden' name='driver-pinglun' value='{$summary_dir.desc}' class='driver-pinglun'>
		    </div>
            <script>
                checkedVal(".driver-pinglun",'input[name="checkbox1"]')
            </script>
			<div class="weui-cell">
		        <div class="weui-cell__hd"><label class="weui-label">整体评分</label></div>
		        <div class="weui-cell__bd">
		            <div id="summary_driver" data-score='{$summary_dir.score}'></div>
		            <input id="summaryinput_driver" name="summaryinput_driver" type="hidden">
		        </div>
		    </div>
	  	</div>
	<div class="weui-cells weui-cells_form">
	  		<div style="text-align: center;padding: 5px 0;background: #ffd966;color: #000;font-family: '黑体';">促销生评价</div>
	<volist name="studentinfo" id="vo" key="key">
		<div class="weui-cells weui-cells_checkbox student_wrap" id="student-{$key}">
			<div class="weui-cell">
				<div class="weui-cell__hd"><label class="weui-label">促销生姓名</label></div>
				<div class="weui-cell__bd">
					<input id="summary_salename" class="weui-input" type="text" value="{$vo['name']}" readonly >
					<input type='hidden' name='student{$key}' value="12">
				</div>
			</div>
			<input type="hidden" name="w_id" value="{$vo.w_id}">
			<label class="weui-cell weui-check__label" for="s21{$key}">
				<div class="weui-cell__hd">
					<input type="checkbox" class="weui-check" name="evaluation{$key}" value="兼职老手" id="s21{$key}" >
					<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
					<p>兼职老手</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s22{$key}">
				<div class="weui-cell__hd">
					<input type="checkbox" name="evaluation{$key}" class="weui-check" value="推销狂人" id="s22{$key}">
					<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
					<p>推销狂人</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s23{$key}">
				<div class="weui-cell__hd">
					<input type="checkbox" name="evaluation{$key}" class="weui-check" value="做事利索" id="s23{$key}">
					<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
					<p>做事利索</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s24{$key}">
				<div class="weui-cell__hd">
					<input type="checkbox" name="evaluation{$key}" class="weui-check" value="诚实守信" id="s24{$key}">
					<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
					<p>诚实守信</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s25{$key}">
				<div class="weui-cell__hd">
					<input type="checkbox" name="evaluation{$key}" class="weui-check" value="踏实稳重" id="s25{$key}">
					<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
					<p>踏实稳重</p>
				</div>
			</label>
			<label class="weui-cell weui-check__label" for="s26{$key}">
				<div class="weui-cell__hd">
					<input type="checkbox" name="evaluation{$key}" class="weui-check" value="热情饱满" id="s26{$key}">
					<i class="weui-icon-checked"></i>
				</div>
				<div class="weui-cell__bd">
					<p>热情饱满</p>
				</div>
			</label>
			<input type='hidden' name='student-pingjia' value='{$summaryInfo.stu1}'  class='student-pingjia{$key}'>
			<div class="weui-cell">
				<div class="weui-cell__hd"><label class="weui-label">整体评分</label></div>
				<div class="weui-cell__bd">
					<div id="summary_saleman{$key}" data-score='{$vo.score}'></div>
					<input id="summaryinput_saleman{$key}" name="summaryinput_saleman" type="hidden" class="score">
				</div>
			</div>
		</div>
		<script>
			checkedVal(".student-pingjia{$key}",'input[name="evaluation{$key}"]')
			$("#summary_saleman{$key}").raty({
				hints:["1","2","3","4","5"],
				path:"__STATIC__/mobile/images",
				click:function(score,evt) {
					//alert(score+" "+evt);
					//alert( $("#summaryinput_saleman{$key}").val(score)) ;
					console.log( $("#summaryinput_saleman{$key}").val(score));
				},
				score : function(){
					return $(this).attr("data-score")
				}
			});
		</script>
	</volist>
		<script>
		      	$('#summary_flowrate').raty({
		      		hints:["1","2","3","4","5"],
		      		path:"__STATIC__/mobile/images",
		      		size:100,
		      		click:function(score,evt) {

		      			//alert(score+" "+evt);
		      			//$('.summary_flowrate').value(score);
		      			$("#summaryinput_flowrate").val(score);
		      		}
		      	});
		      	$('#summary_involvement').raty({
		      		hints:["1","2","3","4","5"],
		      		path:"__STATIC__/mobile/images",
		      		size:100,
		      		click:function(score,evt) {
		      			//alert(score+" "+evt);
		      			$("#summaryinput_involvement").val(score);
		      		}
		      	});
		      	$('#summary_adaptability').raty({
		      		hints:["1","2","3","4","5"],
		      		path:"__STATIC__/mobile/images",
		      		size:100,
		      		click:function(score,evt) {
		      			//alert(score+" "+evt);
		      			$("#summaryinput_adaptability").val(score);
		      		}
		      	});
		      	$('#summary_driver').raty({
		      		hints:["1","2","3","4","5"],
		      		path:"__STATIC__/mobile/images",
		      		size:100,
		      		click:function(score,evt) {
		      			//alert(score+" "+evt);
		      			$("#summaryinput_driver").val(score);
		      		}
		      	});
		</script>
</if>
	  	</div>
		<div class="weui-cells weui-cells_form">
	  		<div style="text-align: center;padding: 5px 0;background: #ffd966;color: #000;font-family: "黑体";">总结描述</div>
		    <div class="weui-cell">
		        <div class="weui-cell__bd">
                <if condition='$summary eq 0'>
		          <textarea class="weui-textarea" name='weui_textarea' placeholder="请输入总结描述..." rows="3">{$summary_loupan.describe}</textarea>
                <else/>
                    <textarea class="weui-textarea" name='weui_textarea' placeholder="请输入总结描述..." rows="3" readonly>{$summary_loupan.describe}</textarea>
                </if>
		        </div>
      		</div>
	  	</div>
	  	<div class="weui-btn-area">
          <input type='hidden' name='actid' value='{$actid}'>
          <if condition='$summary eq 0'>
            <button type="button" class="weui-btn weui-btn_primary" onclick="add_summary()">提交</button>
          </if>
	    </div>

	 </form>
    </div>

	<div id="allmap1"></div>

	<script src="__STATIC__/mobile/js/labs.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script>
  		$(function() {
  		console.log(window.localStorage.mid);
      	var obj2 =["一路", "二路", "三路"];
        $("#adacitvity_name").select({
	        title: "线路",
	        multi: false,
	        input: '',
	        min: 1,
	        // max: 3,
	        items: obj2,
	        beforeClose: function(values, titles) {

	        },
	        onChange: function(d) {
	          console.log(this, d);
	        },
	        onClose: function (d) {
	          console.log('close')
	        }
      	});



        $.fn.raty.defaults.path = '__STATIC__/mobile/images';
        $('#default-demo').raty();

  	});
    </script>
    <script src="__STATIC__/mobile/js/jquery-weui.js"></script>
    <script src="__STATIC__/mobile/js/city-picker.js"></script>
    <script src="__STATIC__/mobile/js/globalvariable.js"></script>
    <script src="__STATIC__/mobile/js/sose.js"></script>
    <script>
      
        var loading = false;
        var areaName = '';
		var cityName = '';
		var pageNo = 1;
		var pageSize = 10;
		var flag ='asc';
		var jobType = 0;
		var workType = 0;
		var tid;
		var jobTypeName;
       	var city = window.localStorage.city;
       	var latitude;
       	var longitude;
       	var first = true;
		
       

        function checkLogin() {
        	// alert(window.localStorage.mid);
        	if (isNull(window.localStorage.mid)) {
        		$('.loginType').attr("data-type",2);
	            $('.loginType').removeClass("icon-tuichudenglu").addClass("icon-iconfontwodea-copy-copy");
        	} else {
        		var obj = {
	        		'mId':window.localStorage.mid,
	        	};
	        	doPost("account/info.web", obj, function(data) {
	        		// JSON.stringify(data)
	        		// alert(JSON.stringify(data));
		            if (data.success) {
		            	// alert(1);
		            	$('.loginType').attr("data-type",1);
		            	$('.loginType').addClass("icon-tuichudenglu").removeClass("icon-iconfontwodea-copy-copy");
		            } else {
		            	// alert(2);
		            	$('.loginType').attr("data-type",2);
		            	$('.loginType').removeClass("icon-tuichudenglu").addClass("icon-iconfontwodea-copy-copy");
		                $.toast(data.errMsg,"text");
		            }
		        }, function(data) {
		              $.toast(data.errMsg,"text");
		        });
        	}
        	
        }
        
        $(window).scroll(function(){                
	        var scrollh = $(document).height();  
	        var bheight =  $(window).height();
	        console.log("scrollh:"+scrollh+",bheight:"+bheight);
	        var scrollTop=Math.max(document.documentElement.scrollTop||document.body.scrollTop);  
	        if((scrollTop + $(window).height()) >= scrollh){  
	            // alert("jiazai"); 
	            
	        }  
	    }); 
    </script>
  </body>
</html>
<script>
  
	function getCheck(name){
		var id_array=new Array();  
		$('input[name="'+name+'"]:checked').each(function(){  
			id_array.push($(this).val());//向数组中添加元素
		});  
		return id_array
	}

	function getStudent(){
		var  student = []
		$(".student_wrap").each(function(item,value){
			var data = {
				w_id: Number($(this).find("input[name=w_id]").val()),
				s_desc:getCheck('evaluation'+(item+1)),
				score:   Number($(this).find("input[name=summaryinput_saleman]").val())
			}
			student.push(data)
		})
		return student
	}

	function add_summary(){
	        var d_desc = getCheck("driver-pinglun")
	        //console.log(d_desc);
	       var summaryinput_flowrate =$("#summary_flowrate").find("input").val();
           //var summaryinput_flowrate =$("#summary_flowrate").val();
	       if(summaryinput_flowrate == ''){
	           alert('请选择场地人流量');return false;
	       }
	       var summaryinput_involvement = $("#summary_involvement").find("input").val();
           //var summaryinput_involvement = $('#summaryinput_involvement').val();
	       if(summaryinput_involvement == ''){
	           alert('请选择人群参与度');return false;
	       }
	       var summaryinput_adaptability = $("#summary_adaptability").find("input").val();
           //var summaryinput_adaptability = $('#summaryinput_adaptability').val();
	       if(summaryinput_adaptability == ''){
	           alert('请选择物业配合度');return false;
	       }
	     /*  var summary_score = $("#summary_score").val();
		 //var summary_score = $('#summary_score').val();
		 if(summary_score == ''){
		 alert('请输入楼盘活动评分');return false;
		 }*/
	       var summaryinput_driver = $("#summary_driver").find("input").val();
           //var summaryinput_driver = $('#summaryinput_driver').val();
	       if(summaryinput_driver == ''){
	           alert('请选择运输员评分');return false;
	       }
	       var summaryinput_saleman = $('#summaryinput_saleman').find("input").val();
           //var summaryinput_saleman = $('#summaryinput_saleman').val();
	       if(summaryinput_saleman == ''){
	           alert('请选择促销生评分');return false;
	       }
	       var driver_pingjia = document.getElementsByName("checkbox1");
	       var a = "";
	       for (var i = 0; i < driver_pingjia.length; i++) {
	            if (driver_pingjia[i].checked) {
	               a += driver_pingjia[i].value+',';
	           }
	       }
	       $('.driver-pinglun').val(a);

	       var stu1 = document.getElementsByName("checkbox2");
	       var a1 = "";
	       for (var i = 0; i < stu1.length; i++) {
	            if (stu1[i].checked) {
	               a1 += stu1[i].value+',';
	           }
	       }
       	$('.student-pingjia').val(a1);
		$.ajax({
			url:"{:U('summaryDetail')}",
			dataType:"json",
			type:"POST",
			data:{
				actid:"<?php echo $_GET['actid'];?>", //这个不用动
				summaryinput_flowrate:$("#summary_flowrate").find("input").val(),      //场地人流量星星数
				summaryinput_involvement:$("#summary_involvement").find("input").val(),   //人群参与度星星数
				summaryinput_adaptability:$("#summary_adaptability").find("input").val(),  //物业配合度星星数
				l_id:"{$info.l_id}",		  //这个不用动
				/*l_score: $("#summary_score").val(),					  //楼盘活动评分*/
				d_id:"{$info.d_id}",          //这个不用动
				d_desc: getCheck("checkbox1"),
				d_score:$("#summary_driver").find("input").val(),					// 运输员星星数
				student: getStudent(),
				desc:$('.weui-textarea').val(),

			},

			success:function(ret){
					if(ret.res==1){
						alert(ret.msg);
						window.location.href="{:U('summaryList')}"
					}
			}
		})
	}


</script>
